package cn.wygandwdn.common.message;

/**
 * @description:
 * @author: WYG
 * @time: 2021/10/24 20:20
 */

public class PingMessage extends Message {

    private String ping;

    public PingMessage(Builder builder) {
        this.ping = builder.ping;
        super.setSequenceId(builder.sequenceId);
    }

    public String getPing() {
        return ping;
    }

    public void setPing(String ping) {
        this.ping = ping;
    }

    @Override
    public int getMessageType() {
        return Ping;
    }


    public static class Builder {
        private long sequenceId;
        private String ping;

        public Builder(long sequenceId) {
            this.sequenceId = sequenceId;
        }

        public Builder ping(String ping) {
            this.ping = ping;
            return this;
        }

        public PingMessage build() {
            return new PingMessage(this);
        }
    }

}
